
class MyUtils{

    static idCardName="manage-system-backed-idCard";

    static  idCard=localStorage.getItem(MyUtils.idCardName) || "" ;

    static loginHref = "../Login/index.html";

    static removeIdCard(){
        localStorage.removeItem(MyUtils.idCardName);
    }

    static getIdCard(){
        return location.getItem(MyUtils.idCardName);
    }

    static saveIdCard(idCard){
        localStorage.setItem(MyUtils.idCardName,idCard);
    }

    static tableBtnDistabled = 'layui-btn-disabled';

    static startEditBtn(dom) {

        var btn = $(dom).parents("tr").find("td a[lay-event=edit]");

        btn.removeClass(MyUtils.tableBtnDistabled);
    }

    static stopEditBtn(dom) {
        console.log("------------------  stopEditBtn start------------------");
        var btn = $(dom).parents("tr").find("td a[lay-event=edit]");

        btn.addClass(MyUtils.tableBtnDistabled);

        console.log("------------------  stopEditBtn end ------------------");
    }

    // 退出登录

    static quitAcc(){
        MyUtils.removeIdCard();
        location.href = MyUtils.loginHref;
     }
}
